//常用短语函数

  function setCommomMsg(msg){
	  document.getElementsByName("executeMsg")[0].value=msg;
  }

  function addCommonMsg(){
	  var url = "<%=request.getContextPath()%>/SysUI/addCommonMsg.jsp";
	  var retvalue = window.showModalDialog(url,null,'dialogHeight:300px;dialogWidth:500px;status=off;scroll=on');
	  if(retvalue){
		  var time = new Date().getTime();
	  	  $.get( "/commonMsgAction!save.do" ,{flowCode:'${curRecFlow.flowcode}' ,title:encodeURI(retvalue.title),msg:encodeURI(retvalue.msg),time:time}, function(data){ 
				alert("增加成功");
				window.location.reload();	
		  });			
	  }
  }

  function delCommonMsg(){
	  commonMsg =  document.getElementsByName("commonMsg")[0];
	  if(commonMsg.value==""){
		  alert("请先选择要删除的常用短语");
		  return false;
	  }
	  var time = new Date().getTime();
	  $.get( "/commonMsgAction!del.do" ,{flowCode:'${curRecFlow.flowcode}' ,title:encodeURI(commonMsg.options[commonMsg.selectedIndex].text),time:time}, function(data){ 
				alert("删除成功");
				window.location.reload();				
	  });	 
  }